import { ref } from "vue"
let v = ref<string>('')
let flag = false
let Arr = [1,23,41,4]
type Props = {
    title:string
}

const renderDom =(props:Props,ctx:any)=>{
    return(
        <div>
            <input v-model={v.value} type="text" />
            <div>{v.value}</div>
            <div v-show={flag}>今天</div>
            <div v-show={!flag}>明天</div>
            { flag? <div>今天</div> : <div>明天</div>}
            <div>{
                Arr.map(v=>{
                    return (<div onClick={clickTap.bind(this,ctx)} data-index = {v}>{v}</div>)
                })}
            </div> 
            <div>{props.title}</div>    
        </div>
    )
}
const clickTap = (ctx:any)=>{
    ctx.emit('on-click',123)
    // console.log('我被点了',v)
}

export default renderDom